package com.matrix.draft.rabbitmqspringboot.rabbitmq.consumer;

import cn.hutool.core.lang.Console;
import com.matrix.draft.rabbitmqspringboot.config.AdvanceRabbitMQConfig;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class AdvanceConfirmConsumer {

    @RabbitListener(queues = AdvanceRabbitMQConfig.queueConfirm)
    void receiveQueueConfirm(Message msg) {
        String body = new String(msg.getBody());
        Console.log("Receiving: ", body);
    }

}
